<template>
	<view class="container">

		<div>
			<p>a:{{ a }}</p>
			<button @click="a++">a++</button>
		</div>

		<uni-card>
			<text>这是一个基础卡片示例，内容较少，此示例展示了一个没有任何属性不带阴影的卡片。</text>
		</uni-card>

		<!-- <uni-countdown :day="1" :hour="1" :minute="12" :second="40"></uni-countdown> -->

		<view>
			<uni-calendar 
				ref="calendar"
				:insert="false"
				@confirm="confirm"
			/>
			<button @click="open">打开日历</button>
		</view>


	</view>
</template>

<script>
export default {
	data() {
		return {
			href: 'https://uniapp.dcloud.io/component/README?id=uniui',
			a: 1,
		}
	},
	methods: {
		open() {
			this.$refs.calendar.open();
		},
		confirm(e) {
			console.log(e);
		}
	},
	onLoad() {
		console.log("微信小程序生命周期:onLoad");
	},
	onReady() {
		console.log("微信小程序生命周期:onReady");
	},
	onShow() {
		console.log("微信小程序生命周期:onShow");
	},
	onHide() {
		console.log("微信小程序生命周期:onHide");
	},
	onUnload() {
		console.log("微信小程序生命周期:onUnload");
	},
	created() {
		console.log("组件生命周期:created");
	},
	mounted() {
		console.log("组件生命周期:mounted");
	},
	unmounted() {
		console.log("组件生命周期:unmounted");
	},
}
</script>

<style>
.container {
	padding: 20px;
	font-size: 14px;
	line-height: 24px;
}
</style>
